const globalEnum = require("./globalEnum");
var GolbalEvent = new cc.EventTarget();

var nodePath = {
    item1: "Canvas\item1",
    item2: "Canvas\item2"
}

GolbalEvent.on(globalEnum.collision, function() {
    let item1 = cc.find(nodePath.item1);
    let item2 = cc.find(nodePath.item2);
    item1.emit(globalEnum.collision);
    item2.emit(globalEnum.collision);
});

module.export = GolbalEvent;